#ifndef TMP112_H
#define TMP112_H

#define DEVICE_ADDR	(0x48)

 
#define I2C_SCL       GPIO_PIN_6
#define I2C_SDA       GPIO_PIN_7
#define GPIO_I2C      GPIOB
#define I2C_SCL_H     gpio_bit_set(GPIO_I2C,I2C_SCL)
#define I2C_SCL_L     gpio_bit_reset(GPIO_I2C,I2C_SCL)
#define I2C_SDA_H     gpio_bit_set(GPIO_I2C,I2C_SDA)
#define I2C_SDA_L     gpio_bit_reset(GPIO_I2C,I2C_SDA)
 
void iic_int(void);
void I2C_StarT(void);
void I2C_StoP(void);
void I2C_Ack(void);
void I2C_NAck(void);
u8   I2C_Wait_Ack(void);
void I2C_Send_Byte(u8 txd);
u8   I2C_Read_Byte(u8 ack);
 


float vTMP112_Temp(u8 addr);
#endif
